/**
 * 
 */
package com.lehecai.core.lottery;

import com.lehecai.core.IntegerBeanLabelItem;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.ArrayList;
import java.util.List;

/**
 * @author qatang
 * 退票方案状态
 */
public class RefundPlanStatus extends IntegerBeanLabelItem {

    private static final long serialVersionUID = -1656913817228474766L;

    private static final Logger logger = LoggerFactory.getLogger(RefundPlanStatus.class.getName());

    private static List<RefundPlanStatus> items = new ArrayList<RefundPlanStatus>();

	protected RefundPlanStatus(String name, int value) {
		super(RefundPlanStatus.class.getName(), name, value);
		items.add(this);
	}
	
	public static RefundPlanStatus getItem(int value){
		try {
			return (RefundPlanStatus) RefundPlanStatus.getResult(RefundPlanStatus.class.getName(), value);
		} catch (Exception e) {
			logger.error(e.getMessage(), e);
			return null;
		}
	}
	
	public static List<RefundPlanStatus> getItems() {
		return items;
	}

	public static final RefundPlanStatus ALL = new RefundPlanStatus("全部", -1);

	public static final RefundPlanStatus PENDING = new RefundPlanStatus("待退款", 0);
	public static final RefundPlanStatus REFUNDED = new RefundPlanStatus("已退款", 1);
}
